<template>
  <a-card class="info" title="专业类别管理">
    <a-row type="flex" justify="center">
      <a-col :span="24">
        <erp-professional-manage-form ref="realForm" :disabled="true" normal></erp-professional-manage-form>
      </a-col>
    </a-row>
  </a-card>
</template>

<script>
import { getAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ErpProfessionalManageForm from './modules/ErpProfessionalManageForm'
import { DisabledAuthFilterMixin } from '@/mixins/DisabledAuthFilterMixin'

export default {
  name: 'ErpProfessionalManageListDetail',
  mixins: [JeecgListMixin, DisabledAuthFilterMixin],
  components: {
    ErpProfessionalManageForm,
  },
  data() {
    return {
      model: {},
      id: '',
      url: {
        queryById: '/api/erp/purchase/material/erpMaterialCategory/queryById',
        delete: '/api/erp/purchase/material/erpMaterialCategory/delete',
      },
      confirmLoading: false,
      iconStyle: { 'font-size': '20px' },
    }
  },
  created() {},
  watch: {
    $route(to, from) {
      this.loadData()
    },
  },
  mounted() {},
  methods: {
    loadData() {
      const id = this.$route.params.id
      getAction(this.url.queryById, { id }).then((res) => {
        if (res.success) {
          const model = res.result
          this.$refs.realForm.edit(model, model.parentId ? 'zczy' : 'zclb')
          this.model = model
        }
      })
    },
  },
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';

.info {
  /deep/ .ant-card-head-title {
    flex: none;
    margin-right: 20px;
  }
  /deep/ .ant-card-extra {
    flex: 1;
    float: left;
  }
}
</style>
